﻿using Demo.App.Core;
using Demo.App.Presentation.Start;
using XEvolve.Core.Runtime;
using XEvolve.Core.Runtime.Attributes;
using XEvolve.Presentation;
using System.Windows.Input;

namespace Demo.App.Presentation
{
    [PluginId("demo.app.presentation")]
    public class PresentationPlugin : Plugin
    {
        public PresentationPlugin([Required("xevolve.presentation", "demo.app.core")]Plugin[] dependencies)
        {
        }

        protected override void Initialize(Platform platform)
        {
            platform.Registry.RegisterExtensionPoint("launchBar.actions");
            platform.Registry.RegisterView<LaunchBar>("demo.app.presentation.lanuchbar");

            platform.Registry.RegisterView<DemoWindow>("/DemoWindow");

            var helloWorldCommand = new RoutedCommand();
            platform.Registry.RegisterExtension("launchBar.actions", helloWorldCommand);

            platform.Registry.RegisterCommandBinding("launchBar", helloWorldCommand, typeof(HelloWorldHandler));
        }
    }
}
